<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="pragma" content="no-cache">
<title>天小天个人网-用户资料</title>
<link rel="shortcut icon " type="images/x-png" href="../../public/pic/icon.png">
<link href="../css/userdata.css" type="text/css" rel="stylesheet">
<link href="../../public/bs/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="../../public/bs/js/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="../../public/bs/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../js/userdata.js" type="text/javascript"></script>
</head>

<body>
	<nav class="navbra navbar-default" >
    <div class="container-fluid">
        <div class="navbar-header">
            <button class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="../model/index.php" class="navbar-brand nav-title">
                天小天个人网
            </a>
        </div>
        <div class="collapse navbar-collapse" id="example-navbar-collapse">
            <ul class="nav navbar-nav">
                <li class=""><a href="../model/index.php">首页</a></li>
                <li class=""><a href="../model/resume.php">个人简历</a></li>
                <li class=""><a href="../model/dynamic.php">我的动态</a></li>
                <li class=""><a href="../model/web.php">web技术</a></li>
                <li class=""><a href="../model/index.php">网站协会</a></li>
                <li class=""><a href="../model/comment.php">给我留言</a></li>
                <li class="active">
                    <a href="<?php echo $herf ?>">
                        <img src="<?php echo $photo ?>" style="width:20px;height:20px;" class="img-circle">
                    </a>
                </li>
            </ul>
        </div>
    </div>
    </nav>
    <div class="userphoto container">
        <form method="post" enctype="multipart/form-data" class="col-xs-4 col-xs-offset-4">
          <div class=""><img src="<?php echo $photo; ?>" width="100px" height="100px" class="center-block img-circle"></div>
          <div class="form-group">
            <input type="file" name="pic" class="center-block" />
            <input type="submit" value="上传方形图片为头像" class="btn btn-success center-block">
          </div>
        </form>
    </div>
	<div class="usertable container">
        <form class="form-horizontal" method="post" action="../model/userdata.php">
          <div class="form-group">
            <label class="col-sm-2 control-label">用户名：</label>
            <div class="col-sm-8">
              <?php foreach($userdata as $v){?>
              <input type="text" class="form-control" name="username" value="<?php echo $v['username']; ?>">
              <?php }?>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">姓&nbsp;&nbsp;&nbsp;&nbsp;名：</label>
            <div class="col-sm-8">
              <?php foreach($userdata as $v){?>
              <input type="text" class="form-control" name="name" value="<?php echo $v['name']; ?>">
              <?php }?>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">年&nbsp;&nbsp;&nbsp;&nbsp;龄：</label>
            <div class="col-sm-8">
              <?php foreach($userdata as $v){?>
              <input type="number" class="form-control" name="ago" value="<?php echo $v['ago']; ?>">
              <?php }?>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">性&nbsp;&nbsp;&nbsp;&nbsp;别：</label>
           <div class="col-sm-2">
             <label class="radio-inline">
                 <?php foreach($userdata as $v){?>
                <input type="radio" name="gender" value="男" <?php if($v['gender']=="男")echo 'checked';?>>男 
             </label>
             <label class="radio-inline">
                <input type="radio" name="gender" value="女" <?php if($v['gender']=="女")echo 'checked';?>>女 
                 <?php }?>
             </label>
           </div>
         </div>
         <div class="form-group">
          <label class="col-sm-12 control-label center-block">
            <input class="btn btn-warning col-md-3 col-md-offset-2" type="reset" value="重置">
            <input class="btn btn-success col-md-3 col-md-offset-2" type="submit" value="保存">
          </label>
        </div>
      </form>
	</div>
</body>
</html>